package com.jgj.zxkj.lookandcheckjggroupinfo.record;

import android.graphics.Color;

import com.jgj.zxkj.lookandcheckjggroupinfo.R;
import com.jgj.zxkj.lookandcheckjggroupinfo.record.home.HomeDelegate;
import com.jgj.zxkj.lookandcheckjggroupinfo.record.person.PersonDelegate;
import com.sa.all_cui.mix_core.delegate.bottom.BaseBottomDelegate;
import com.sa.all_cui.mix_core.delegate.bottom.BottomItemDelegate;
import com.sa.all_cui.mix_core.delegate.bottom.BottomTabBean;
import com.sa.all_cui.mix_core.delegate.bottom.ItemBuilder;

import java.util.LinkedHashMap;

/**
 * Created by all-cui on 2017/10/27.
 */

public class CheckBottomDelegate extends BaseBottomDelegate {

    @Override
    public LinkedHashMap<BottomTabBean, BottomItemDelegate> setItems(ItemBuilder builder) {
        final LinkedHashMap<BottomTabBean,BottomItemDelegate> items = new LinkedHashMap<>();
        items.put(new BottomTabBean(getString(R.string.bottom_home_key),getString(R.string.bottom_home_value)),new HomeDelegate());
        items.put(new BottomTabBean(getString(R.string.bottom_user_key),getString(R.string.bottom_user_value)),new PersonDelegate());
        return builder.addItem(items).build();
    }

    @Override
    public int setIndexDelegate() {
        return 0;
    }

    @Override
    public int setClickedColor() {
        return Color.parseColor("#ffff8888");
    }

    @Override
    public void switchBottomItem(int selectedDelegate) {
        if (selectedDelegate==0){
            changeStatusBarColor(R.color.colorDeepSea);
        }else{
            changeStatusBarColor(R.color.colorMossLight);
        }
    }
}
